

var pageContext = new PageContextDatatable(settings||{});
pageContext.formInit = function(layero){
}
pageContext.renderUpdatePageOther = function(layero,data,para,option){
	layero.find("span[name='categoryCode']").text(data.categoryName);
	if(window.global.hasInstance){
		layero.find("select[name='instanceId']").attr("oldval",data.instanceId).val(data.instanceId);
		tvc.changeDefaultValue(layero.find("select[name='instanceId']").get(0));
	}
}
pageContext.toAdd = function(option){
	var action = window.global.getFinalUrl(pageContext.setting.toAddUrl);
	load(action,"page-content",true,"新增"+pageContext.modelName,function(){
		
	});
}
pageContext.toDetail = function(id,data){
	var action = window.global.getFinalUrl(pageContext.setting.toDetailUrl);
	action = window.global.addPara(action,"id",id,true)
	load(action,"page-content",true,pageContext.modelName+"详情",function(){
		
	});
}
pageContext.toUpdate = function(id,data){
	var action = window.global.getFinalUrl(pageContext.setting.toUpdateUrl);
	action = window.global.addPara(action,"id",id,true)
	load(action,"page-content",true,"修改"+pageContext.modelName,function(){
		
	});
}
jQuery(function($) {
   pageContext.init();

	 $(document).find("input").each(function(){
		 $(this).attr("autocomplete","off");
	 });
}); 
